#ifndef _GAME_H_DACHI_
#define _GAME_H_DACHI_
#include "Characters/Character.h"
#include "Locations/Location.h"
#include "Util.h"
#include <fstream>
#include <cstdarg>

class Game
{
	public:
		Game();
		~Game();
		//void doBattle(Character& opponent);
		void print_welcome_message();
		void print_exit_message();
		void print_begin_message();
		void print_end_message();
		
		void run();
		void gameloop();
		
		void createNewGame();
		void loadGame();
		
		void print_main_menu();
		void stop();
		
		friend bool save(Game &, std::string);
		friend bool saveGame (Game&, std::ofstream&);
		friend bool loadGame(Game &g, std::ifstream & input);
		friend Location* loadLocation(Game &g, std::ifstream & input);

	private: 
		bool stopped;
		
		std::vector<cmdalt> get_alternatives();
		
		std::string create_begin_story();
		std::string create_end_story();
		
		void addLocation(Location * first_loc, ...);
		void gameloop(std::vector<std::string> input);
		void parseInput(std::vector<std::string>);

		void save_game();
		
		Location * current_loc;
		Character * player;
		
		std::string begin_story;
		std::string end_story;
		
		std::vector<Location*> locations;
		
		void delete_game();
};

#endif

